1. Field of the Invention
The present invention relates to a graphics processor for producing vector, arcuate and circular line drawings on a video display in general and in particular to a method and apparatus for anti-aliasing vector, arcuate and circular line drawings on a video display.
2. Description of Prior Art
A video display comprises a plurality of rows and columns of uniformly spaced discrete locations called pixels. The pixels are illuminated by means of one or more electron beams which are directed through holes in a mask which define the boundaries of the pixels.
To draw a vector, i.e. straight line, on the display, the end points X.sub.l,Y.sub.1 and X.sub.2,Y.sub.2 of the line are sent to a graphics processor. The processor, using a suitable algorithm, such as the Bresenham Line Algorithm described in Fundamentals of Interactive Computer Graphics by Foley & VanDam, identifies the location of all pixels intersected by the vector. If the desired vector passes between the centers of a pair of pixels and, therefore, does not intersect the center of either of them, the algorithm identifies the location of the pixel closest to the centerline of the vector and generates a signal which is used for illuminating that pixel to a predetermined intensity. The selected pixel may be either above or below the centerline of the vector.
The number of pixels in which the center of the pixel is intersected by a vector on a display varies as the slope of the vector on the display changes such that to an observer, as the slope of the vector varies, the vector on the display appears more or less jagged. This effect, which is called aliasing, is analogous to the effect of sampling a signal at a frequency too low to allow exact reconstruction of that particular signal.
Heretofore, a number of proposals have been made to reduce the jagged appearance, i.e. aliasing, of a vector on a video display by selectively controlling the intensity of the illuminated pixels. Typically, the intensity is made inversely proportional to the distance of a pixel from the centerline. In one such proposal, a method called pixel dithering is employed.
In pixel dithering, the intensity of a pixel is controlled by controlling the amount of the electron beam flux which is permitted to impinge on the surface of the display. Recalling that pixel boundaries are defined by the boundaries of a hole in a mask, 100% pixel intensity is achieved when the electron beam is directed into the center of the hole. If the electron beam is turned on during a scan such that 50% of the beam is blocked by the mask, then the pixel intensity will be reduced to 50%. Similarly, if 75% of the beam is blocked by the mask, then the pixel intensity will be reduced to 25%, etc.
The disadvantages of pixel dithering is that it has only been used for anti-aliasing vectors and has not been used for anti-aliasing arcs and circles; it is expensive to build the electronic circuits required for controlling the electron beam, and the vectors displayed on the video display cannot be stored in a bit map.
In another method, to reduce the jagged appearance, i.e. aliasing, of a vector on a video display, it has been proposed to illuminate not one, but two, pixels in either a row or a column of pixels intersected by a vector with the intensity of the pixels being inversely proportional to their distance from the centerline of the vector. For example, in their article Filtering Edges for Gray-Scale Displays, Computer Graphics, August 1981, pp.1-5, Gupta and Sproull propose that to improve gray-scale displays, a pair of pixels T.sub.i and S.sub.i be turned on to an intensity inversely proportional to their distances d.sub.1 and d.sub.2 from the centerline of a vector. The distances d.sub.1 and d.sub.2 are calculated from the equations: EQU d.sub.1 =t cos .alpha. (1) EQU d.sub.2 =s cos .alpha. (2)
where:
d.sub.1 and d.sub.2 are the distances of T.sub.i and S.sub.i from the vector in a direction perpendicular to the vector; PA1 t and s are the vertical distances of T.sub.i and S.sub.i from the centerline of the vector as determined by the Bresenham algorithm; and PA1 .alpha.=angle of vector relative to a row of pixels intersected by the vector. PA1 d=distance of pixel from centerline PA1 d.sub.min, d.sub.max =numbers of the form N/16 with N=0,1,2 . . . ,15 and correspond to the minimum and maximum distances of each range from the centerline. PA1 and D is an internal error factor used in the Bresenham algorithm for decision taking PA1 abs(D) has the range .epsilon.[0,2R] respectively.
After the distances d.sub.1 and d.sub.2 are calculated, the intensity of the pixels T.sub.i and S.sub.i is made inversely proportional thereto.
Disadvantages of the Gupta and Sproull proposal are that the calculations required for evaluating the expressions (1) and (2) above are generally difficult and time consuming in that they involve independent expressions comprising trigonometric functions. Moreover, they result in producing a "barber-pole" effect, i.e. the intensity of the pixels lying along the centerline of the curve varies, producing an impression of twist.